# !/usr/bin/env python
# -*-coding:utf-8 -*-

"""
# Author     ：xialang333@gmail.com
# Time       ：2024/4/13 10:09
# Description：
"""
from django.urls import re_path, path
from rest_framework import routers

from apps.crond.views.task import TaskViewSet
from apps.crond.views.task_detail import TaskDetailViewSet
from apps.crond.views.scriptm import TaskMethodViewSet

system_url = routers.SimpleRouter()
system_url.register(r'task', TaskViewSet)
system_url.register(r'task_method', TaskMethodViewSet)


urlpatterns = [
    path('task/job_list/',TaskViewSet.as_view({'get':'job_list'})),
    path('task/update_status/<str:pk>/',TaskViewSet.as_view({'post':'update_status'})),
    path('task_detail/',TaskDetailViewSet.as_view({'get':'list'})),
    path('update_file/',TaskViewSet.as_view({'post':'update_file'})),
    path('get_file/',TaskViewSet.as_view({'get':'get_file'})),
    path('pre_check/',TaskMethodViewSet.as_view({'post':'pre_check'})),
]
urlpatterns += system_url.urls